new Vue({
    el: '#app',
    data: {
        active: 3,
        user: {},
        randGoods: {},
        notice:[],
    },
    mounted: function () {
        this.main();
    },
    methods: {
        main: function () {
            var _this = this;
            $http.post('/shop/api.goods/rand_goods', {}).then(function (res) { return _this.randGoods = res.data; });
            $http.post('/member/api.passport/notice', {}).then(function (res) {
                _this.notice = res.data.data;
           });
        },
        toggleGoods: function () {
            var _this = this;
            $http.post('/shop/api.goods/rand_goods', {}).then(function (res) { return _this.randGoods = res.data; });
        },
        //公告详情
        Details:function(id){
            console.log(id);
            location.href = '../../member/center/Details.html?id='+id;
        },
    }
});
